package nl.weeaboo.sh.level1;

import nl.weeaboo.game.input.UserInput;
import nl.weeaboo.sh.Game;
import nl.weeaboo.sh.level.Level;
import nl.weeaboo.sh.objects.Enemy;
import nl.weeaboo.sh.view.anim.Animation;

public class Skull extends Enemy {
	
	public Skull(Game game, Level level) {
		super(game, level, game.getCharaImage("object/skull.png#walk1"));
		
		dir = -1;
		maxHp = hp = 9;
		setSpeed(-2, 0);
		setPower(7);
		
		a_walk = Animation.create(game, "object/skull.png", true,
				"walk1", 6, "walk2", 6, "walk3", 6, "walk2", 6);
		a_attack = Animation.create(game, "object/skull.png", false,
				"attack1", 6, "attack2", 6, "attack1", 6);
		
		anim = a_walk;
	}

	//Functions	
	protected int recalculateAttackFrame() {
		return 30 + (int)(180 * Math.random());		
	}
	protected void attack() {
		setSpeed(dir * 10.0f, -10.0f);		
	}
	
	public void update(UserInput input, float dt) {		
		
		super.update(input, dt);
	}
	
	//Getters
	
	//Setters
	
}
